<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>如何识别数组 2</title>
</head>

<body>
    <h1>JavaScript 数组</h1>
    <p>新的 ECMASCRIPT 5 方法 isArray 在数组上使用时返回 true：</p>
    <p id="demo"></p>
    <script>
        var fruits = ["Banana", "Orange", "Apple", "Mango"];
        document.getElementById("demo").innerHTML = Array.isArray(fruits);
    </script>
</body>

</html>